<template>
    <router-view></router-view>
</template>

<script>
    export default {
        provide(){
            return {
                // reload:this.reload
            }
        },
        data(){
            return{
                // isRouterAlive:true
            }
        },
        methods:{
            // reload(){
            //   this.isRouterAlive = false
            //   this.$nextTick(function(){
            //     this.isRouterAlive
            //   })
            // }
            checkData(d){
                return !(!d || typeof d.key !== "string");
            }
        },
        mounted() {
            const that = this;
            window.addEventListener("message", (event)=>{
                if(!that.checkData(event.data)) return undefined;
                const key = event.data.key;
                if(key.toLowerCase()==="check-out-tailing"){
                    that.$store.commit("changeTailingNumber", event.data.data);
                }
            });
        }
    }
</script>

<style>
    body{
        padding: 0;
        margin: 0;
        background-color: #F0F0F0;
    }
    *{
        font-family: PingFangSC-Regular, sans-serif;
    }

    .no-header-table>.el-table__header-wrapper{
        display: none;
    }

    /* 全局引入icon */
    @font-face {
        font-family: 'icomoon';
        src:  url('assets/icon/icomoon.eot?bo6v67');
        src:  url('assets/icon/icomoon.eot?bo6v67#iefix') format('embedded-opentype'),
        url('assets/icon/icomoon.ttf?bo6v67') format('truetype'),
        url('assets/icon/icomoon.woff?bo6v67') format('woff'),
        url('assets/icon/icomoon.svg?bo6v67#icomoon') format('svg');
        font-weight: normal;
        font-style: normal;
        font-display: block;
    }

    [class^="icon-"], [class*=" icon-"] {
        /* use !important to prevent issues with browser extensions that change fonts */
        font-family: 'icomoon' !important;
        speak: never;
        font-style: normal;
        font-weight: normal;
        font-variant: normal;
        text-transform: none;
        line-height: 1;

        /* Better Font Rendering =========== */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    .icon-download:before {
        content: "\e919";
    }
    .icon-scroll-config:before {
        content: "\e928";
    }
    .icon-w-technology:before {
        content: "\e90e";
        color: #fff;
    }
    .icon-w-shield:before {
        content: "\e900";
        color: #fff;
    }
    .icon-shield:before {
        content: "\e901";
    }
    .icon-upload:before {
        content: "\e902";
    }
    .icon-warn:before {
        content: "\e903";
    }
    .icon-screen:before {
        content: "\e904";
    }
    .icon-target:before {
        content: "\e905";
    }
    .icon-chart:before {
        content: "\e906";
    }
    .icon-w-note:before {
        content: "\e907";
        color: #fff;
    }
    .icon-blocks:before {
        content: "\e908";
    }
    .icon-list:before {
        content: "\e909";
    }
    .icon-w-list:before {
        content: "\e90a";
        color: #fff;
    }
    .icon-w-screen:before {
        content: "\e90b";
        color: #fff;
    }
    .icon-wifi:before {
        content: "\e90c";
    }
    .icon-address-book:before {
        content: "\e90d";
    }
    .icon-rain:before {
        content: "\e90f";
    }
    .icon-lock:before {
        content: "\e910";
    }
    .icon-round-chart:before {
        content: "\e911";
    }
    .icon-node-book:before {
        content: "\e912";
    }
    .icon-warn-note:before {
        content: "\e913";
    }
    .icon-calendar:before {
        content: "\e914";
    }
    .icon-note:before {
        content: "\e915";
    }
    .icon-w-home:before {
        content: "\e916";
        color: #fff;
    }
    .icon-histogram:before {
        content: "\e917";
    }
    .icon-alarm-note:before {
        content: "\e918";
    }
    .icon-pie-arrow:before {
        content: "\e91a";
    }
    .icon-w-avatar:before {
        content: "\e91b";
        color: #fff;
    }
    .icon-pie:before {
        content: "\e91c";
    }
    .icon-question:before {
        content: "\e91d";
    }
    .icon-error:before {
        content: "\e91e";
    }
    .icon-whiteboard:before {
        content: "\e91f";
    }
    .icon-config:before {
        content: "\e920";
    }
    .icon-id-card:before {
        content: "\e921";
    }
    .icon-w-warning:before {
        content: "\e922";
        color: #fff;
    }
    .icon-speaker:before {
        content: "\e923";
    }
    .icon-warning:before {
        content: "\e924";
    }
    .icon-accept-screen:before {
        content: "\e925";
    }
    .icon-big-pen-note:before {
        content: "\e926";
    }
    .icon-w-config:before {
        content: "\e927";
        color: #fff;
    }
    .icon-accident-report:before {
        content: "\e929";
        color: #fff;
    }

</style>
